﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.Concurrent;
using Caliburn.PresentationFramework;

namespace IronCommander
{
    public static class ExtensionMethods
    {
        public static BindableCollection<T> ToBindable<T>(this IEnumerable<T> collection)
        {
            return new BindableCollection<T>(collection);
        }

        public static bool Implements<T>(this Type type)
        {
            return type.GetInterfaces().Contains(typeof(T));
        }

        public static void Raise(this Action action)
        {
            if (action != null)
                action();
        }
    }
}
